<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>ZTREE DEMO - Simple Data</TITLE>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css">
<link rel="stylesheet" href="../../zTree/css/metroStyle/metroStyle.css" type="text/css">
<script type="text/javascript" src="../../zTree/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../zTree/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="../../zTree/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" src="../../zTree/js/jquery.ztree.exedit-3.5.js"></script>
<SCRIPT type="text/javascript">
	var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			view: {
				showLine: false,
				showIcon: false,
				checkable : true,
				fontCss : { 'color': 'blue',"font-family": "微软雅黑", "font-size": "14px"}
			},
			check: {
				enable: true
			}
	};
	$(document).ready(function() {
		var treeNode;
		$.ajax({
			async : false,
			cache : false,
			type : 'POST',
			dataType : "json",		
			url : "getReczsk",
			error : function() {
				alert('请求失败');
			},
			success : function(data) {
				treeNode = data;
			}
		});
		$.fn.zTree.init($("#treeDemo"), setting, treeNode);
	});
	function serarch(){	
		var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
		var nodes = treeObj.getCheckedNodes(true);
		for (var i=0;nodes.length>i;i++) {
			var node=nodes[i]
			alert(node.name);
		}
	};
</SCRIPT>
</HEAD>

<BODY>
	<div class="content_wrap">
	<div>
		<ul id="treeDemo" class="ztree" style="font_size:80px;background-color:#FFFFFF;border: 0px;overflow-y:auto;overflow-x:auto;"></ul>
	</div>
	<button onclick="javascript:serarch()">搜索</button>
</div>
</BODY>
</HTML>